Random numbers have a wide variety of uses from Monte Carlo simulations to computer games, and include without restriction: lottery number generation; generating parameters of systems that require random variability such as simulations; testing of error correcting codes and communication by the use of random errors; use in extra-sensory perception (ESP) experiments; art, such as random pictures or music generation; gambling and gaming, such as the generation of random events, realism, and AI engines; vector initialization; padding; and in authentication and cryptographic key generation.
Conventionally two major methods are used to generate random numbers, one being algorithmic and the other being nondeterministic. Random number generation by algorithmic, also known as a Pseudorandom number generator (PRNG), uses a deterministic formula to calculate a periodic sequence of numbers. Usually, the numbers generated are completely determined by an initial state or seed. A number of different pseudorandom number generators (PRNG) exist, including those falling into the flowing categories:                Linear Congruential is a recurrence relation of the form Xi=aXi−1+b mod m, where a b m εZ.        Lagged Fibonnacci is a recurrence relation of the form Xi=(Xi-rrXi-s) mod m where r, s, m εZ are constants with r>s and  is a binary operator such as +, −, x, xor. The relation also requires an initial data set (X1, X2, X3, . . . , Xr).        Linear Feedback Shift Registers (LFSR) are based on linear polynomials of the form p(x)=xn+pn−1xn-1+ . . . +p2x2+p1x+p0, where pi ε{0, 1}. It is desired to choose a primitive polynomial since this would yield a LFSR of maximal periodicity.        
As a primitive polynomial is irreducible and cannot be factored into the product of polynomials of smaller degree, p0 is chose as p0=1 since if p0=0 then the polynomial would be divisible by x.
The state (X0, X1, X2, . . . , Xn−1) is selected to be an initial state, where Xi ε {0, 1}, and the feedback function is defined:                f(x0, x1, x2 . . . , xn−1)=cn−1xn−1+ . . . +c2x2+c1x1+c0x0 mod 2, where ci=pi for i=0, . . . , n−1. (pi's come from the coefficients of p(x).)        Let Xout=f(X0, X1, X2, . . . , Xn−1)        The recurrence relation used is Xi=Xi+1, for i=0, . . . , n−2        Xn−1=Xout         
Cryptographic PRNG is a generator that use cryptographic constructs or some hard problem to create sequences which are safe for use in cryptography. One example of such as generator is the Blum Blum Shub (B.B.S.) PRNG. Blum Blum Shub (B.B.S.) is a cryptographically safe pseudorandom number generating algorithm defined by the following recurrence relation:                xn+1=x2 mod m, where m=pq, p and q are large primes and are congruent to 3 mod 4 (this ensures that the square root exists).        
For a large cycle length, gcd(φ(p−1), φ(q−1)) is made small. Generally, the least significant bit(s) or parity of xn+1 is the random output. The security of the generator is reduced to the integer factorization problem since the only known way to solve the quadratic residue problem is to factor m.
Unlike true random number generators, pseudorandom number generators contain the intrinsic flaw of being periodic. However, the periodicity of an algorithmically generated sequence, such as those generated by PRNGs, may be astronomically large, thus giving the sequence a feeling of being unpredictable with a desired uniformity of distribution. The periodicity of a well designed pseudorandom number generator may be so large that it is not likely for a computer to complete a single cycle. A generator with this property may be well suited for cryptographic purposes as long as its internal state remains secret.
Conventional nondeterministic random number generators, also referred to as a True random number generator (TRNG), use physical phenomena that are believed to be nondeterministic, such as thermal noise (Johnson-Nyquist noise), nuclear decay, or Quantum Shot Noise to generate random data.
The general layout of a conventional TRNG 8 is shown in FIG. 1. Typically, conventional TRNG 8 includes a noise source 10, such as nuclear decay or thermal noise, a noise collector 12 configured to receive or sense “noise”, and a microprocessor 14. The noise generated in the noise source 10 is sent or received by the noise collector 12, where it is transformed into something usable, allowing the creation of random data. The random data is then post processed by a suitable algorithm in the microprocessor 14, in an attempt to condition and remove any bias, so that it allows the TRNG 8 to conform to the desirable property. After post processing, the random data is provided as a desired electronic/video output.
TRNGs are in general slower than PRNGs. This can be rather cumbersome if one requires the generation of large numbers of random numbers. Pseudorandom number generators are generally very fast and have throughputs that are directly related to the speed of the device on which they are implemented. It has been recognized that a combination of deterministic and nondeterministic systems may advantageously be used to create a hybrid random number generator (HRNG). In such a system a TRNG is used to seed the internal state of a PRNG. The advantage of such systems, and provided it can collect enough entropy from its source, is that the overall system generation rate may be fast, and have the desirable property of a random number generator, allowing for good quality numbers to be generated at acceptable rates.
Recently, a TRNG has been proposed which utilizes fluctuating beam intensity of a semiconducting laser as a chaotic source of randomness to produce a high speed stream of bits with sequence rates of up to 12.5 Gbits/s. The generation of true random numbers has however, to date proven to be a difficult process. Since digital hardware is designed to perform predictably in a deterministic way, this typically makes finding unpredictable events outside of the scope of standalone digital systems. As a result, software designers are forced to utilize external events such as keyboard and mouse clicks, hard disk timings, or Ethernet packet intervals, as well as other technologies from analog technology to extract unpredictable events. However, such conventional analog techniques have drawbacks, since information is lost when any analog signal is transformed discretely. This means that even if the analog signal shows perfect randomness, the process of extracting the randomness may be flawed. Such flaws may contribute to a bias in the random data, or worse, cause predictability in the sequence.
More recently, the use of reconfigurable digital hardware such as Complex Programmable Logic Devices (CPLDs), Application Specific Integrated Circuits (ASICS), and Field Programmable Gate Arrays (FPGAs) have been applied as new techniques for the generation of random numbers. These new techniques use jitter and metastability to provide digital systems with the facilities to easily access unpredictable events. In particular, Jitter is the short-term variation of a digital signal's significant instants, that is, the deviation of the timing edges from their ideal positions in time. Metastability is the unpredictable oscillation, which is neither logically high or low, of a signal that eventually stabilizes to an unpredictable output (high or low).